<?php

/**
 * OpeningsEndings form base class.
 *
 * @package    form
 * @subpackage openings_endings
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
 */
class BaseOpeningsEndingsForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'               => new sfWidgetFormInputHidden(),
      'idvideoanimacion' => new sfWidgetFormInput(),
      'tipo'             => new sfWidgetFormInput(),
      'direccion'        => new sfWidgetFormInput(),
      'orden'            => new sfWidgetFormInput(),
      'titulo'           => new sfWidgetFormInput(),
      'grupo'            => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'               => new sfValidatorPropelChoice(array('model' => 'OpeningsEndings', 'column' => 'id', 'required' => false)),
      'idvideoanimacion' => new sfValidatorInteger(),
      'tipo'             => new sfValidatorString(),
      'direccion'        => new sfValidatorString(array('max_length' => 255)),
      'orden'            => new sfValidatorInteger(array('required' => false)),
      'titulo'           => new sfValidatorString(array('max_length' => 250)),
      'grupo'            => new sfValidatorString(array('max_length' => 250)),
    ));

    $this->validatorSchema->setPostValidator(
      new sfValidatorPropelUnique(array('model' => 'OpeningsEndings', 'column' => array('direccion')))
    );

    $this->widgetSchema->setNameFormat('openings_endings[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'OpeningsEndings';
  }


}
